test: improve validation request body helpers#175
Conversation
feb9bf5 to
4ad05de
Compare
| // has all required fields. | ||
| // According to OpenAI documentation https://platform.openai.com/docs/api-reference/chat/create, | ||
| // the "model" and "messages" fields are required. | ||
| // Returns an error if validation fails. |
There was a problem hiding this comment.
I probably misunderstood something but his comment says that:
the "model" and "messages" fields are required.
While below for responses:
no fields are strictly required.
but the code here doesn't check this while in responses it does.
There was a problem hiding this comment.
Yes, so according to the OpenAI API documentation on chat creation model and messages are required fields. But according to the OpenAI API documentation on responses creation no fields are required, but AFAIK both the model and input fields are generally set. The purpose of these functions is to validate that AIBridge is sending valid request bodies
There was a problem hiding this comment.
but the code here doesn't check this while in responses it does.
Ah nvm it is checked just github collapses code without changes...

Improves the request body validation helpers in integration tests.
Follow-up from: #164